All data handler components have a component type value of 'dhlr' , which is defined by the dataHandlerType constant. Data handler components use the value of the component subtype field to indicate the type of data reference they support. As a result of this convention, note that all data handlers that share a component subtype value must be able to recognize and work with data references of the same type. For example, file system data handlers always carry a component subtype value of 'alis' , which indicates that their data references are file system aliases (note that this is true for QuickTime on the Macintosh and under Windows, even though there is not, properly, a file system alias under Windows). Apple's memory-based data handler for the Macintosh has a component subtype value of 'hndl' .
#define dataHandlerType 'dhlr'
#define rAliasType 'alis'
Apple has not defined any special manufacturer field values or component flags values for data handler components. Developers may use the manufacturer field value to select your data handler from among all the data handlers that support a given type of data reference.
Apple has defined a functional interface for data handler components. For information about the functions that your component must support, see "Data Handler Components Reference" . You can use the following constants to refer to the request codes for each of the functions that your component must support:
enum {
kDataGetDataSelector = 2, /* DataHGetData */
kDataPutDataSelector = 3, /* DataHPutData */
kDataFlushDataSelector = 4, /* DataHFlushData */
kDataOpenForWriteSelector = 5, /* DataHOpenForWrite */
kDataCloseForWriteSelector = 6, /* DataHCloseForWrite */
kDataOpenForReadSelector = 8, /* DataHOpenForRead */
kDataCloseForReadSelector = 9, /* DataHCloseForRead */
kDataSetDatRefSelector = 10, /* DataHSetDataRef */
kDataGetDataRefSelector = 11, /* DataHGetDataRef */
kDataCompareDataRefSelector = 12, /* DataHCompareDataRef */
kDataTaskSelector = 13, /* DataHTask */
kDataScheduleDataSelector = 14, /* DataHScheduleData */
kDataFinishDataSelector = 15, /* DataHFinishData */
kDataFlushCacheSelector = 16, /* DataHFlushCache */
kDataResolveDataRefSelector = 17, /* DataHResolveDataRef */
kDataGetFileSizeSelector = 18, /* DataHGetFileSize */
kDataCanUseDataRefSelector = 19, /* DataHCanUseDataRef */
kDataGetVoumeListSelector = 20, /* DataHGetVolumeList */
kDataWriteSelector= = 21, /* DataHWrite */
kDataPreextendSelector = 22, /* DataHPreextend */
kDataSetFileSizeSelector = 23, /* DataHSetFileSize */
kDataGetFreeSpaceSelector = 24, /* DataHGetFreeSpace */
kDataCreateFileSelector = 25, /* DataHCreateFile */
kDataGetPreferredBlockSizeSelector = 26,
/*DataHGetPreferredBlockSize */
kDataGetDeviceIndexSelector = 27, /* DataHGetDeviceIndex */
/* 28 and 29 unused */
kDataGetScheduleAheadTimeSelector= 30,
/* DataHGetScheduleAheadTime */
kDataSetOSFileRefSelector = 516, /* DataHSetOSFileRef */
kDataGetOSFileRefSelector = 517, /* DataHGetOSFileRef */
kDataPlaybackHintsSelector = 3+0x100/* DataHPlaybackHints */
};
| Previous | Chapter Contents | Chapter Top | Next |